﻿using Colorful.Furniture.IEntity;
using FreeSql.DataAnnotations;
using System;

namespace Colorful.Furniture.ErpInventoryManagement;

/// <summary>
/// 产品关联客户信息
/// </summary>
[Table(Name = "erp_bbs_inventory_customer")]
public class InventoryWithCustomer : AuditTenantSoftDeleteAggregateRoot
{
    /// <summary>
    ///   编码
    /// </summary>
    [Column(Name = "id")]
    public Guid Id { get; set; }

    /// <summary>
    ///   产品编码
    /// </summary>
    [Column(Name = "inventory_id")]
    public Guid? InventoryId { get; set; }

    /// <summary>
    ///  产品编号
    /// </summary>
    [Column(Name = "product_no", StringLength = 50)]
    public string ProductNo { get; set; }

    /// <summary>
    ///  客户编码
    /// </summary>
    [Column(Name = "customer_id")]
    public Guid? CustomerId { get; set; }

    /// <summary>
    ///  折扣
    /// </summary>
    [Column(Name = "discount", Scale = 4, Precision = 12)]
    public decimal? Discount { get; set; }

    /// <summary>
    ///  售价
    /// </summary>
    [Column(Name = "sale_price", Scale = 4, Precision = 12)]
    public decimal? SalePrice { get; set; }

    /// <summary>
    ///  手续比例（店铺售卖金额 - 系统产品对应客户的售卖金额）
    /// </summary>
    [Column(Name = "commission", Scale = 4, Precision = 12)]
    public decimal? Commission { get; set; }

    /// <summary>
    ///  产品
    /// </summary>
    public Inventory Inventory { get; set; }

}

